<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@include file="/context/mytags.jsp" %>
<script>
    function LogoFormatter(val, row) {
        return '<a rel="datagrid_group" href="' + val + '" title=""><img alt="" src="' + val + '" width="30px" heigth="30px"></a>';
    }
    function bandImg() {
        $("a[rel=datagrid_group]").fancybox({
            'overlayShow': false,
            'transitionIn': 'elastic',
            'transitionOut': 'elastic'
        });
    }
</script>
<t:datagrid name="stuPersonList" title="" actionUrl="consultantController.do?stuPersonGrid&id=${id}"
            idField="studioConsultantId" onLoadSuccess="bandImg" queryMode="group">
    <t:dgCol title="common.code" field="studioConsultantId" hidden="true"></t:dgCol>
    <%--<t:dgCol title="工作室主键" field="studioId" ></t:dgCol>--%>
    <t:dgCol title="全名" field="consultantEntity.aCustomerEntity.realname" query="true"  width="1"></t:dgCol>
    <%--<t:dgCol title="别名" field="consultantEntity.aCustomerEntity.nickname"  width="1"></t:dgCol>--%>
    <t:dgCol title="等级" field="level" dictionary="studioConsultantLevel" query="true" width="1"></t:dgCol>
    <t:dgCol title="联系方式" field="consultantEntity.aCustomerEntity.phone" width="1"></t:dgCol>
    <%--<t:dgCol title="图片" field="pic"  extendParams="formatter:LogoFormatter;"></t:dgCol>--%>
    <%--<t:dgCol title="是否可用" field="enable"  width="50"></t:dgCol>--%>
    <t:dgCol title="common.operation" field="opt" width="1"></t:dgCol>
    <t:dgFunOpt funname="f_setLevel(studioConsultantId)" title="等级设定"></t:dgFunOpt>
    <t:dgDelOpt url="consultantController.do?delStuPerson&id={studioConsultantId}" title="common.delete"></t:dgDelOpt>

    <t:dgToolBar title="新增专家" langArg="common.language" icon="icon-add" url="consultantController.do?consultandList&id=${id}" funname="add" width="900" height="500"></t:dgToolBar>

    <%--<t:dgToolBar title="编辑广告信息" langArg="common.language" icon="icon-edit" url="adController.do?addorupdate&pid=${pid}" funname="update" width="680" height="400"></t:dgToolBar>--%>

</t:datagrid>
<script type="text/javascript">
    function f_setLevel(studioConsultantId) {
        var title = "排序";
        var width = 300;
        var height = 100;
        var url = "consultantController.do?setLevel&id=" + studioConsultantId;
        createwindow(title, url, width, height);
    }
</script>

